Documentation
AI assistant
Documentation on the AI assistant
Nitrokit is smart:
- It knows about your codebase
- It knows which types of projects there are
- It knows which elements those projects can contain and expose
- It comes with an AI assistant that you can ask to code and refactor for you
What does it generate for me?
Basically you can ask it anything.
- "Generate a data service in the project influencer-feat-channel with the name foo"
- "Change the scope of the project code-assistant-feat-shell to influencer"
- "Remove the project influencer-feat-channel"
- "Move the element in the project code-assistant-feat-shell that has the filename get-elements-by-project.util.ts to the project shared-util-nx"
But it get's further than that:
- "In the code-assistant-feat-shell project, for the shell-entry.smart-component.ts perform the following task: generate-datatest-ids"
- "In the code-assistant-feat-shell project, generate a util with the name sort-dates that sorts dates ascending or descending based on a function param"
Now this gets really crazy. It can even generate this for you
"In the influencer-feat-channel project, generate a form with the name user with the following implementation: There should be a first name, last name, age and description. The description should live in a general form group, that also contains a VAT number. The VAT number should be validated in a way that only valid VAT numbers can be entered, the age should not be higher than 18 and the first name is required. When the first name is not filled in, we should disable the last name. When the first name is Brecht, the description should contain the text hiyaa!"
How to use the agent
In the keys.json
you have to add your own openai and antrophic keys to use the api.
Then run the following two commands:
npx nx run code-assistant:serve
and
npx nx run code-assistant-electron:serve
Which models does Nitrokit use
Nitrokit is smart about the pricing to, so it uses a combination of the GPT mini 4o model for simple things and the Anthropic Claude sonnet 3.5 for more complex things.
Can I create my own prompts?
YES!! And that's exactly what you should do The code is filled with examples and best practices
for prompt engineering, copy-paste a generator like the utilGenerator
and start expanding this awesome AI-agent.
What features does the AI agent currently have?
Glad you asked! Here is an overview:
- Visualizes the scopes, the types of projects and which elements each project holds
- Shows the usage of tokens
- Shows a chat history between you and the different models
- Chat that generates code for you at the right spot
- The code is generated in a dry-run, so you can review the code and than apply it to the file system
- Diff tool between code that is updated by the AI assistant
- Handy autocompletion suggestions by tabbing
- AI tasks on specific elements, like generating data testids
- Code generation with actual implementation written to the correct directory incl unittests
- Light/dark mode
- Nitrokit prevents you from generating stuff in the wrong directory, EG, you can't generate a ui-component in a data-access lib
Nitrokit is growing every day, and we are focusing on AI BIG TIME!, future versions can include:
- Talking to your codebase
- Let an agent find and fix bugs for your
- etc...
Have questions?
Still have questions? Talk to support.