Install free-code, the free AI coding agent for your terminal
free-code reads your project, edits files with a diff you approve, runs your tests and fixes what fails. One line installs it on macOS, Linux or Windows.
curl -fsSL https://free.ai/install.sh | sh
irm https://free.ai/install.ps1 | iex
No Python, pip or admin rights needed first. Run the same line again to upgrade.
Free to start: 6,000 tokens a day with no account, 30,000 a day with a confirmed free account.
Other ways to install
The one-line installer uses uv, then pipx, then a private Python environment, whichever works first. If you already use one of these tools, install the freeai-code package directly:
uv tool install freeai-code
pipx install freeai-code
pip install freeai-code
npm install -g freeai-code
The npm package needs Python 3.9 or newer on the machine.
Install a specific version
# macOS / Linux
curl -fsSL https://free.ai/install.sh | FREE_CODE_VERSION=<version> sh
# Windows (PowerShell)
$env:FREE_CODE_VERSION = "<version>"; irm https://free.ai/install.ps1 | iex
To force one install method, set FREE_CODE_INSTALLER to uv, pipx or venv the same way.
Check that it worked
free-code --version
First run
Open a terminal in your project folder and start a session. It works right away with no account.
cd your-project
free-code
# Or one task at a time
free-code ask "How does the auth system work?"
free-code run "Add unit tests for the User model"
Safe mode is on by default: you see a diff and approve each file edit and command before it runs. The first time, free-code asks once whether to send anonymous crash reports. The default answer is no.
Sign in and API keys
Signing in raises your daily free allowance and lets you use paid models from your token balance. Your browser opens at Free.ai, you press Approve, and the CLI receives a key automatically.
free-code login # opens your browser
free-code login --no-browser # over SSH: approve from any device with a short code
free-code login --manual # paste a key or choose your own provider
free-code logout # forget the key on this machine
You can also create a key yourself in your account and set it, which is handy for servers and CI:
free-code config set token sk-free-...
# or, for one shell or a CI job
export FREE_CODE_TOKEN=sk-free-...
Use your own provider key
free-code also works with your own OpenAI, Anthropic, Google or OpenRouter key. Requests then go to that provider with your key.
free-code config set provider anthropic
free-code config set api_key sk-ant-...
Pick a model
free-code lists every model Free.ai serves, free tier models first. Free tier models cost no tokens within your daily allowance; paid models are billed in tokens.
free-code models # chat models, free tier first
free-code models --free # only models that cost no tokens
free-code models --type image # image, video, tts, stt, ocr, music ...
free-code config set model <id> # default model for new sessions
Inside a session, type /model to switch. Browse all models
Common commands
| Command | What it does |
|---|---|
free-code | Start an interactive session in this folder |
free-code -c | Resume the latest session for this project |
free-code ask "..." | Ask one question about the codebase |
free-code run "..." | Carry out one coding task |
free-code -p "..." | Print the answer and exit, for scripts and CI |
free-code sessions | List saved sessions you can resume |
free-code tools | Show the tools the agent can use and which need approval |
free-code cloud "..." --repo URL | Run a task in the Free.ai cloud and get a report |
free-code tasks | List your recent cloud tasks |
free-code rc | Watch and drive the session from the Free.ai app |
free-code mcp add | Connect an MCP server |
free-code update | Upgrade to the latest release |
free-code config | Show your settings |
Besides editing files and running commands, the agent can generate images, speech, music and video into your project, transcribe audio, read text from screenshots and PDFs, search the web with citations and translate locale files.
Update and uninstall
free-code update upgrades through whatever installed it. To remove it, use the same tool:
free-code update
uv tool uninstall freeai-code
pipx uninstall freeai-code
pip uninstall freeai-code
npm uninstall -g freeai-code
If the installer created its own environment, delete the .free-code folder in your home directory and the free-code file in .local/bin. Your settings and saved sessions also live in .free-code.
Troubleshooting
free-code: command not found
The install folder is not on your PATH yet. On Windows, open a new terminal. On macOS or Linux, add it to your shell profile and open a new terminal:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc # or ~/.zshrc
The free anonymous limit for today is used up
Run free-code login to sign in and get the larger daily allowance of a free account, or add tokens to use paid models. See pricing
The installer cannot download uv
Some networks block astral.sh. Install with pipx or pip instead, or set FREE_CODE_INSTALLER=venv to use your own Python 3.9 or newer.
python3 -m venv failed on Debian or Ubuntu
Install the python3-venv package with apt, then run the install line again.
Still stuck? Type /feedback inside free-code, or open an issue on GitHub. GitHub issues
FAQ
Start coding with AI in your terminal
curl -fsSL https://free.ai/install.sh | sh