adam-ai
v0.1.2
Published
Adam is a CLI tool designed to help developers generate/execute simple and complex shell commands. Smart enough to understand your project's structure and suggest the right commands based on what you're working on.
Maintainers
Readme
Adam CLI
Adam is a CLI tool designed to help developers generate/execute simple and complex shell commands. Smart enough to understand your project's structure and suggest the right commands based on what you're working on.
System Requirements
- Node.js >= 16.x
- npm >= 8.x
- OpenAI API key and/or Your Gemini API keyFeatures
- AI Models: Seamlessly choose between OpenAI and Google Gemini for generating commands.
- Project Analysis: In-dept understanding of the current working directory for the project structure and dependencies.
- Git Integration: Understands git status and can generate git commands.
- Configuration: Easily configure API keys and defaults.
- Dependency Management: Scans and reports project dependencies.
- Voice Commands: Voice input support powered by whisper [Beta]
- OS Support: Works fine on Unix-based systems and Windows.
Roadmap
- Voice Commands: Use voice input for commands via AssemblyAI, additionally to whisper.
- Error Insights: Understand previous shell error messages without leaving your terminal.
Installation
Install Adam globally using NPM:
npm install -g adam-aiCall Adam:
adam
Usage
Basic Commands
Show Help:
adam --helpShow Version:
adam --version
Configuration Commands
Configure API keys and defaults:
adam configOpen config file in your default editor:
adam open-configShow current configuration in shell:
adam show-config
AI Model Commands
Force using OpenAI for the next command:
adam openai <your-command>Force using Gemini for the next command:
adam gemini <your-command>
Debug Mode
Run any command with DEBUG=true to see details on what's happening:
DEBUG=true adam "install express"Examples
- Create a new React project:
adam create new nextjs app called project-57 with typescript, tailwind, and trpc# Response:
✔ Command created
[OpenAI] npx create-next-app@latest project-57 --typescript --tailwind --eslint --src-dir --use-npm && cd project-57 && npm install @trpc/server @trpc/client- Create an Express API:
adam initialize an express api named project-57-server with prisma, postgresql, and basic auth setup# Response:
✔ Command created
[OpenAI] mkdir project-57-server && cd project-57-server && npm init -y && npm install express prisma @prisma/client pg bcrypt jsonwebtoken && npx prisma init && touch .env && echo "DATABASE_URL=postgresql://user:password@localhost:5432/mydb" >> .env && touch app.js routes/auth.js controllers/authController.js middlewares/authMiddleware.js && mkdir models && touch models/user.js- Simple Git Opp:
# Let's force use the Gemini Model here (Pk must have been setup)
adam gemini commit changes# Response:
✔ Command created
[Gemini] git add . && git commit -m "feat: add external_subscriber_addr to config and update run.sh for cleanup support"# Current Branch:(docs/initial-docs ✔)
adam switch back to main and pull# Response:
✔ Command created
[OpenAI] git checkout main && git pull origin main
✔ ▶️ Ready to run this command? (Y/n) · Yes
> About to run this command: git checkout main && git pull origin main
Switched to branch 'main'
Your branch is up to date with 'origin/main'.
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
Unpacking objects: 100% (1/1), 909 bytes | 909.00 KiB/s, done.
From github.com:Developerayo/adam
* branch main -> FETCH_HEAD
1e6e97a..afaed51 main -> origin/main
Updating 1e6e97a..afaed51
Fast-forward
readme.md | 197 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
src/services/gemini.js | 9 ++++
src/services/openai.js | 9 ++++
3 files changed, 213 insertions(+), 2 deletions(-)
✔ Command executed successfully!# Stage Changes, Switch to Staging, Pull Latest & Merge Develop
adam stash changes, switch to staging, pull latest, merge develop# Response:
✔ Command created
[OpenAI] git stash && git checkout staging && git pull origin staging && git merge developConfiguration Schema
Adam's configurations are stored in ~/.adam-cli.json:
{
"openaiApiKey": "sk-GbKnOWMMEA",
"assemblyaiApiKey": "8835d6",
"defaultPromptMethod": "text",
"enableVoiceDetection": true,
"geminiApiKey": "AIzywY",
"defaultModel": "openai",
"userName": "Ayo"
}Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature-branch). - Open a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Authors
- Shodipo Ayomide - @developerayo
Contributors
- Emeka Orji - @thecoderabbi
Acknowledgments
- Special thanks to all contributors and the open-source community.
