Aimy

Commands

Here's an incomplete list of commands. The most important commands are listed first. A more complete listing of the auth commands follows.

It's important to understand the structure of commands. Most commands are handled by dispatch objects, which are specified by the first word of the command. The second word is a function to be called by the dispatch object. Additional words are parameters for the function.

  1. auth firstuser [user] [pass]

    This command tells the auth dispatch object to execute the firstuser function given username 'user' and password 'pass'. A new user account will be created with superuser permissions, but only if no user currently exists.

    Attempting to add a "firstuser" user when other users already exist will result in an error.

    As of version 0.0016, this initial command can now be handled on the Home tab (when connected through http://localhost:4180) using a form built for this specific purpose. There should be no reason to do it in the command tab, but it's still possible. The command is useful if you need to create your first user via a raw connection to port 4101.

  2. auth login [user] [pass]

    This command tells the auth dispatch object to execute the login function given username 'user' and password 'pass'. If the user exists and the password is correct, a user session is returned.

    Again, this command can now be handled by the login form on the Home tab when connecting through a web browser.
  3. version

    Dispatcher returns this always-public command's result containing version information about the running app.

  4. root status

    Tells the root dispatch object to retrieve the status information for the root object.

  5. shutdown

    Shuts down the aimy software. No further commands will be possible until aimy is started again.

    Unlike the previous commands, this command has no dispatch prefix. It interacts with the core container that manages the entire system, so is handled directly by the dispatcher object.

  6. root names

    Returns a result with a list of the names of service items currently running directly under the root object.

  7. root tree

    Returns a result with a tree of items currently running under the root object.

  8. coreload

    Decore's all aimy software objects, deletes the old objects, reloads all aimy software python code, and restores the original objects with their previous cores intact. This is meant for development purposes only - to reload aimy without closing established connections.

    Like "shutdown", this command directly affects the core, so is handled directly by the dispatcher.

Service Commands

The service command lets you forward a command to any object in the root object's service tree. The syntax works like this: Type "service [path.to.service] [command] [args ...]"

You can determine which services are available (and their path) by refreshing the list in the "Service" tab. NOTE that some services come and go, such as the HTTP connections used to run aimy's web admin page.

As an example, here's how to tell the app.update service to check for new versions of the aimy software by sending the check command to the app.update service:

service app.update check

Each service will have it's own set of commands and arguments. I'll try to (eventually) get them all listed/updated, but you might find a lot of "easter eggs" by looking through the code.

I'll start with the commands that all objects support:

Other 'auth' Commands

I see aimy as typically being a single-user app, but the auth dispatcher has all these nifty commands that let you add, manage, and delete other users so I'll include the commands here.

Here's a screenshot of the aimy command page.