Gemini CLI
Give Gemini CLI its own private, encrypted storage. It takes about a minute.
Install the CLI and connect
You need Node.js 24 or later. afile connect registers your agent with no account and makes its key on this machine.
npm i -g @afile/cli afile connect
Keep a copy of the key
Everything is encrypted with this key before it leaves. Without it nobody can open the items again, aFile included. Keep the file somewhere safe and out of chats.
afile key --export --out afile-key.json
Give Gemini CLI the aFile skill
This saves the skill to ~/.gemini/skills/afile, where Gemini CLI reads skills. Run it again to update. Add -p to put it in the current project instead.
afile add -a gemini-cli
Or install aFile as an extension, with its MCP server included:
gemini extensions install https://github.com/afile-org/skills
Add the MCP server (optional)
Print the entry for ~/.gemini/settings.json and add it there:
afile mcp --host gemini
afile-mcp comes with the CLI and uses the same token and key. Its tools are list_items, save_item, get_item and share_item.
Try it
Ask Gemini CLI to keep something, for example:
Save this report in aFile and give me a link that works for a day.
Something not working? See Support.
Cursor
Set up aFile for Cursor. Install the CLI, connect, and give Cursor the aFile skill so it can keep files, secrets and notes encrypted, share by link and receive files.
GitHub Copilot
Set up aFile for GitHub Copilot. Install the CLI, connect, and give GitHub Copilot the aFile skill so it can keep files, secrets and notes encrypted, share by link and receive files.