feat: initial project setup with implementation plan
- Add PLAN.md with 40-step checklist across 10 phases - Add CLAUDE.md with project-specific instructions - Set up nix flake with FastHTML/MonsterUI dependencies - Create Python package skeleton (src/animaltrack) - Vendor FastHTML and MonsterUI documentation - Add Docker build configuration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
4
src/animaltrack/__init__.py
Normal file
4
src/animaltrack/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# ABOUTME: AnimalTrack - Event-sourced animal tracking for poultry farm management.
|
||||
# ABOUTME: Main package initialization.
|
||||
|
||||
__version__ = "0.1.0"
|
||||
61
src/animaltrack/cli.py
Normal file
61
src/animaltrack/cli.py
Normal file
@@ -0,0 +1,61 @@
|
||||
# ABOUTME: Command-line interface for AnimalTrack.
|
||||
# ABOUTME: Provides migrate, seed, and serve commands.
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
"""Main entry point for the AnimalTrack CLI."""
|
||||
parser = argparse.ArgumentParser(
|
||||
prog="animaltrack",
|
||||
description="AnimalTrack - Event-sourced animal tracking for poultry farm management",
|
||||
)
|
||||
subparsers = parser.add_subparsers(dest="command", help="Available commands")
|
||||
|
||||
# migrate command
|
||||
migrate_parser = subparsers.add_parser("migrate", help="Run database migrations")
|
||||
migrate_parser.add_argument(
|
||||
"--to", type=str, help="Migrate to specific version", default=None
|
||||
)
|
||||
|
||||
# create-migration command
|
||||
create_parser = subparsers.add_parser(
|
||||
"create-migration", help="Create a new migration file"
|
||||
)
|
||||
create_parser.add_argument("description", help="Description for the migration")
|
||||
|
||||
# seed command
|
||||
subparsers.add_parser("seed", help="Load seed data")
|
||||
|
||||
# serve command
|
||||
serve_parser = subparsers.add_parser("serve", help="Start the web server")
|
||||
serve_parser.add_argument("--port", type=int, default=5000, help="Port to listen on")
|
||||
serve_parser.add_argument("--host", type=str, default="0.0.0.0", help="Host to bind to")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.command is None:
|
||||
parser.print_help()
|
||||
sys.exit(1)
|
||||
|
||||
if args.command == "migrate":
|
||||
print(f"Running migrations (to={args.to})...")
|
||||
# TODO: Implement migration runner
|
||||
print("Migration not yet implemented")
|
||||
elif args.command == "create-migration":
|
||||
print(f"Creating migration: {args.description}")
|
||||
# TODO: Implement migration creation
|
||||
print("Migration creation not yet implemented")
|
||||
elif args.command == "seed":
|
||||
print("Loading seed data...")
|
||||
# TODO: Implement seeder
|
||||
print("Seeding not yet implemented")
|
||||
elif args.command == "serve":
|
||||
print(f"Starting server on {args.host}:{args.port}...")
|
||||
# TODO: Implement server
|
||||
print("Server not yet implemented")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user