Management Command
The index_smarter_project management command: index The Smarter Project’s repositories and blog.
The MCPServer’s public endpoint searches an index of each repository’s files, and of the blog’s
posts. This command brings those indexes up to date, either in the foreground, which shows
each outcome, or by queueing the Celery tasks of smarter.apps.mcpserver.tasks, which is
how manage.py initialize_platform runs it.
Note
Experimental. The MCPServer was designed and coded by Claude Code (Anthropic’s Claude Opus 5.5), with Lawrence McDaniel as co-author. It is experimental, and will be documented.
- class smarter.apps.mcpserver.management.commands.index_smarter_project.Command(*args, **kwargs)[source]
Bases:
SmarterCommandDjango manage.py index_smarter_project command.
Brings the index of each of The Smarter Project’s repositories up to date with its branch, and the index of its blog up to date with its published posts. A repository whose branch has not moved since it was indexed, or a blog whose posts have not changed, is skipped, unless
--forceis given.--repositoryindexes only the named repositories, and--blogonly the blog. With--queue, the repositories are indexed by the Celery worker instead, which is howmanage.py initialize_platformruns it.A repository that cannot be indexed is reported as a warning, and the command still succeeds: the failure is recorded in the index’s
error, and the previous index, if any, is still searched.Side effects: requests to the GitHub api and the blog, and the replacement of the indexed files in the database. With
--queue, Celery tasks are queued instead.Example usage:
python manage.py index_smarter_project python manage.py index_smarter_project --repository smarter-cli --force python manage.py index_smarter_project --blog python manage.py index_smarter_project --queue
- add_arguments(parser)[source]
Add the command’s options:
--repository,--blog,--forceand--queue.- Parameters:
parser – The command’s argument parser.
- handle(*args, **options)[source]
Index the repositories and the blog that the options name, or queue their indexing.
Without
--repositoryor--blog, every repository and the blog are indexed. With--queueand neither of them, oneindex_repositories()task is queued, which queues the others.- Parameters:
args – Unused.
options – The parsed options.
- help = "Index The Smarter Project's GitHub repositories, and its blog, for the MCPServer's public endpoint."