https://github.com/sw-yx/ask-cli Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Blog * Solutions + By Plan + Enterprise + Teams + Compare all + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} sw-yx / ask-cli Public * Notifications * Fork 0 * Star 21 a cli to ask questions of gpt3 and iterate/chain of thought twitter.com/swyx/status/1588243607617560576 License MIT license 21 stars 0 forks Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights sw-yx/ask-cli This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 2 branches 1 tag Code * Clone HTTPS GitHub CLI [https://github.com/s] Use Git or checkout with SVN using the web URL. [gh repo clone sw-yx/] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @sw-yx sw-yx Merge pull request #1 from sw-yx/addCantDoMath ... 3d4ca9a Nov 3, 2022 Merge pull request #1 from sw-yx/addCantDoMath add you cant do math 3d4ca9a Git stats * 8 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .gitignore initial working version Nov 3, 2022 LICENSE initial working version Nov 3, 2022 README.md Merge branch 'main' of https://github.com/sw-yx/ask-cli into addCantD... Nov 3, 2022 index.ts minor tweaks Nov 3, 2022 package.json minor tweaks Nov 3, 2022 promptAugmentors.ts works Nov 3, 2022 View code ask CLI Install instructions Usage instructions Local Dev README.md ask CLI Ask is a Deno CLI for pinging GPT-3 and iterating with chain of thought prompting and other prompt engineering tricks. Inspired by Linus' prototype (his impl here) image But it can also iterate on prompts: image And then it runs them in parallel for you to choose: image Install instructions We use deno compile to ship a dedicated executable for each system architecture. See the Releases page to download the appropriate binaries. If you know what you're doing, you may also just run from source locally, see Local Dev below Put the binary in your $PATH or just navigate your terminal to the folder where it is. Usage instructions These instructions are for Mac, but you should be able to adjust for Linux/Windows accordingly. First get your OpenAI API Key from: https://beta.openai.com/account/ api-keys Then: export OPENAI_API_KEY=sk_your_api_key_here ask "How much wood would a woodchuck chuck if a woodchuck could chuck wood?" By default you get a panel of options, but you can always exit with Ctrl+C. The real power of this CLI comes from chaining prompts. You can run candidate prompts in parallel and choose prompts based on the responses. image And then it runs them in parallel for you to choose: image Local Dev Make sure to have Deno installed. Then, you can either: * deno run -A index.ts "how do i sample from a normal distribution from scratch in python?" for local dev * npm run build && ./builds/askcli "Shawn has five toys. For Christmas, he got two toys each from his mom and dad. How many toys does he have now?" to do a production build Debugging: deno run --inspect-brk -A index.ts -d "How many of the integers between 0 and 99 inclusive are divisible by 8?" and then open chrome://inspect, open the directory in devtools and put in breakpoints. About a cli to ask questions of gpt3 and iterate/chain of thought twitter.com/swyx/status/1588243607617560576 Resources Readme License MIT license Stars 21 stars Watchers 1 watching Forks 0 forks Releases 1 tags Packages 0 No packages published Languages * TypeScript 100.0% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.