For complete beginners at the hackathon - follow these steps exactly!
Get Claude AI working in your terminal in 3 minutes!
- Open your browser and go to: https://console.anthropic.com/
- Click "Sign Up" (you can use Google/GitHub)
- Once logged in, click "Get API Keys" or "API Keys" in the menu
- Click "Create Key"
- Copy the key (it starts with
sk-ant-)
π° Cost: Free trial includes $5 credit - plenty for the hackathon!
Open your terminal and run these commands:
# Go to the project folder
cd CLI-template
# Install the required libraries
pip install -r requirements.txtNote: If pip doesn't work, try pip3 instead:
pip3 install -r requirements.txt# Create your .env file
cp .env.example .envNow edit the .env file:
- Windows: Open with Notepad
- Mac:
open .envor use TextEdit - Linux:
nano .envor any text editor
Replace your_api_key_here with your actual API key:
Before:
ANTHROPIC_API_KEY=your_api_key_here
After:
ANTHROPIC_API_KEY=sk-ant-api03-your-actual-key-here
Save the file!
python cli.py ask "Say hello!"You should see:
π€ Asking Claude: Say hello!
π€ Claude says:
Hello! How can I help you today?
Ask a question:
python cli.py ask "What's Python?"Start a chat:
python cli.py chatAnalyze a file:
python cli.py analyze sample.txt- Make sure you created the
.envfile (not.env.example) - Check that your API key is pasted correctly
- No spaces around the
=sign!
- Run
pip install -r requirements.txtagain - Make sure you're in the CLI-template folder
- Try
python3instead ofpython - You might need to install Python: https://python.org
- Go back to console.anthropic.com
- Generate a new API key
- Replace it in your
.envfile
Open cli.py in your favorite editor and start building!
Ideas:
- Change line 32 to use a different AI model
- Add your own commands (see
examples.md) - Make Claude a pirate, teacher, or comedian
- Build something unique for the hackathon!
- Read
README.mdfor detailed documentation - Check
examples.mdfor project ideas - Start building your hackathon project!
- Ask Claude for help:
python cli.py ask "How do I..."
You now have a working AI CLI! Go build something awesome!
Questions? Read the main README.md or ask Claude itself for help!
Good luck at the hackathon! π