CLI Reference - Essential Commands
🛠️ CLI Reference
Section titled “🛠️ CLI Reference”Here are the Framefox terminal commands you’ll actually use! No overwhelming lists - just the essentials that help you build cool stuff.
The Big 5 Commands 🌟
Section titled “The Big 5 Commands 🌟”These 5 commands will handle 90% of what you need:
1. Initialize a new project
Section titled “1. Initialize a new project”mkdir myprojectcd myprojectframefox initCreates a complete new Framefox project with the proper project structure.
2. Start your development server
Section titled “2. Start your development server”framefox runRuns your app at http://localhost:8000 with auto-reload when you make changes.
3. Create database tables
Section titled “3. Create database tables”framefox database create-migrationframefox database upgradeUpdates your database when you add/change entities.
4. Generate code automatically
Section titled “4. Generate code automatically”framefox create controllerframefox create entityframefox create crudCreates controllers, entities, and complete CRUD systems.
5. Create user accounts
Section titled “5. Create user accounts”framefox create userSets up authentication, login, signup - the whole user system!
Project Commands 🚀
Section titled “Project Commands 🚀”Starting fresh
Section titled “Starting fresh”# Create project directorymkdir gamevaultcd gamevault
# Initialize Framefox projectframefox init
# Start the serverframefox runCode Generation 🏗️
Section titled “Code Generation 🏗️”Create a simple page
Section titled “Create a simple page”framefox create controller# Follow prompts to name your controller# Creates [controller](/framefox/core/controllers) + [template](/framefox/core/templates)Create a data model
Section titled “Create a data model”framefox create entity# Follow the prompts to add fields# Creates: [SQLModel entity](/framefox/core/database) and repositoryCreate complete CRUD system
Section titled “Create complete CRUD system”framefox create crud# Choose your entity, then "Templated CRUD controller"# Creates: [forms](/framefox/core/forms), pages, everything!Add user accounts
Section titled “Add user accounts”framefox create user# Creates complete [authentication system](/framefox/core/security)# Login/signup pages included!Database Commands 💾
Section titled “Database Commands 💾”Create your database
Section titled “Create your database”framefox database createUpdate database structure
Section titled “Update database structure”# After adding/changing [entities](/framefox/core/database)framefox database create-migrationframefox database upgradeCheck database status
Section titled “Check database status”framefox database statusDebugging Commands 🐛
Section titled “Debugging Commands 🐛”See all your pages/routes
Section titled “See all your pages/routes”framefox debug routerClear cache if things get weird
Section titled “Clear cache if things get weird”framefox cache clearCommon Workflows 📋
Section titled “Common Workflows 📋”Adding a new feature
Section titled “Adding a new feature”# 1. Create the data modelframefox create entity
# 2. Update databaseframefox database create-migrationframefox database upgrade
# 3. Create the web interfaceframefox create crud
# 4. Test it!framefox runStarting a new project
Section titled “Starting a new project”# 1. Create projectmkdir myprojectcd myprojectframefox init
# 2. Set up databaseframefox database create
# 3. Add user accountsframefox create userframefox database create-migrationframefox database upgrade
# 4. Run it!framefox runWhen Things Go Wrong 😅
Section titled “When Things Go Wrong 😅”Server won’t start?
Section titled “Server won’t start?”framefox cache clearframefox runDatabase errors?
Section titled “Database errors?”framefox database status# Check what went wrongForgot what pages you have?
Section titled “Forgot what pages you have?”framefox debug router# Lists all your URLsWant help with any command?
Section titled “Want help with any command?”framefox --helpframefox create --helpframefox database --helpPro Tips 💡
Section titled “Pro Tips 💡”Speed up development
Section titled “Speed up development”- Keep
framefox runrunning in one terminal - Use another terminal for commands
- The server auto-reloads when you change files!
Save time with CRUD
Section titled “Save time with CRUD”- Instead of building forms manually, use
framefox create crud - It creates everything: forms, validation, pages, buttons
- You can customize the generated code afterward
Database best practices
Section titled “Database best practices”- Always run migrations after changing entities
- Check
framefox database statusif something seems off - Never edit migration files directly
Getting unstuck
Section titled “Getting unstuck”- Use
framefox debug routerto see all your pages - Check the terminal where
framefox runis running for error messages framefox cache clearfixes many weird issues
That’s really all you need! 🎉
Section titled “That’s really all you need! 🎉”These commands will take you from zero to a working web application using Framefox’s interactive terminal. Don’t get overwhelmed by complex documentation - just start building and learn as you go!
Ready to build something awesome? Go back to the QuickLaunch guide and start creating! 🚀
Creates your database file (for SQLite) or connects to your database server.
### Create a migration```bashframefox database create-migrationAfter you change your models, this creates a “migration” file that updates your database structure.
Apply migrations
Section titled “Apply migrations”framefox database upgradeActually applies the changes to your database. Run this after creating migrations.
Check database status
Section titled “Check database status”framefox database statusShows you what’s currently in your database and if there are pending changes.
Code Generation Commands ⚡
Section titled “Code Generation Commands ⚡”These are the magic commands that save you tons of time!
Create a controller
Section titled “Create a controller”framefox create controller nameCreates a controller (handles web requests) and its template file.
Create an entity (model)
Section titled “Create an entity (model)”framefox create entity nameCreates a database model with interactive prompts for properties.
Create complete CRUD
Section titled “Create complete CRUD”framefox create crud entity-nameCreates everything needed to add/edit/delete/view records: controller, forms, templates.
Create user system
Section titled “Create user system”framefox create userSets up complete user authentication: registration, login, password security.
Debug Commands 🔍
Section titled “Debug Commands 🔍”When things go wrong, these help you figure out what’s happening:
See all routes
Section titled “See all routes”framefox debug routerShows all the URLs your app responds to and which controllers handle them.
Clear cache
Section titled “Clear cache”framefox cache clearIf weird things are happening, try this first. Clears all cached data.
Quick Reference Card 📋
Section titled “Quick Reference Card 📋”Print this out and keep it handy!
| What you want to do | Command |
|---|---|
| Start new project | framefox init project-name |
| Start development server | framefox run |
| Create database | framefox database create |
| Add new model | framefox create entity name |
| Add web pages for model | framefox create crud name |
| Add user accounts | framefox create user |
| Update database | framefox database create-migration then framefox database upgrade |
| See all URLs | framefox debug router |
| Fix weird issues | framefox cache clear |
Common Workflows 🔄
Section titled “Common Workflows 🔄”Starting a new project
Section titled “Starting a new project”framefox init my-appcd my-apppython -m venv venvsource venv/bin/activate # or venv\Scripts\activate on Windowspip install -r requirements.txtframefox database createframefox runAdding a new feature
Section titled “Adding a new feature”# 1. Create the modelframefox create entity feature
# 2. Update databaseframefox database create-migrationframefox database upgrade
# 3. Create web pagesframefox create crud feature
# 4. Test it!framefox runWhen things break
Section titled “When things break”# Try these in order:framefox cache clearframefox database statusframefox debug routerPro Tips 💡
Section titled “Pro Tips 💡”Use tab completion
Section titled “Use tab completion”Most terminals support tab completion. Type framefox cr and press Tab to see framefox create.
Check what’s generated
Section titled “Check what’s generated”After running generation commands, look at the files created. You’ll learn a lot!
Don’t memorize, bookmark
Section titled “Don’t memorize, bookmark”You don’t need to remember every command. Keep this page bookmarked and refer to it.
Start simple
Section titled “Start simple”Use the basic commands first. As you get comfortable, explore the advanced options.
Need More Help? 🆘
Section titled “Need More Help? 🆘”- Full documentation: Check the main Framefox docs for detailed explanations
- Interactive help: Add
--helpto any command for specific options - Community: Join the Framefox Discord or GitHub discussions
Remember: every developer looks up commands. Even experienced ones! Don’t feel bad about referring to this page often. 😊
What’s Next? 🚀
Section titled “What’s Next? 🚀”These commands will get you through 90% of your Framefox development. As you build more complex apps, you’ll naturally discover additional commands and options.
The most important thing? Start building! Use these commands to create your first project and see what happens. That’s how you really learn.
Happy coding! 🎉