Cortical Labs Application Boilerplate Generator

This module is a command-line tool only and cannot be imported directly.

Usage:
python -m cl.app.init [target_directory]

Without arguments, creates an application skeleton in the current directory. With a path argument, creates the skeleton in that directory (creating it if needed).

The generated structure includes:

  • info.json - Application metadata (name, version, author, etc.)
  • default.json - Default configuration with name and timeout_s fields
  • src/__init__.py - Application entry point with application instance
  • src/app.py - Application and config class definitions
  • web/ - Directory for web visualisation files (empty)
  • presets/ - Directory for preset configurations (empty)
Example:

Create a new application in my-app/:

<div class="pdoc-code codehilite">
<pre><span></span><code>python<span class="w"> </span>-m<span class="w"> </span>cl.app.init<span class="w"> </span>my-app
<span class="nb">cd</span><span class="w"> </span>my-app
<span class="c1"># Edit files as needed...</span>
<span class="c1"># Package the application</span>
python<span class="w"> </span>-m<span class="w"> </span>cl.app.pack
<span class="c1"># Creates ../my-app.zip</span>
<span class="c1"># Upload the package to the device</span>
</code></pre>
</div>

cl.app.init