_nifectl apps_

Managing applications is one of the core features of Nifectl. The apps command group provides comprehensive tools for creating, deploying, monitoring, and controlling your Nife applications throughout their entire lifecycle. Whether you're launching a new application, moving it between organizations, or managing its runtime state, these commands give you complete control.

nifectl apps#

Main command for application management operations.

Usage#

nifectl apps [command] [flags]

Available Commands#

  • create - Create a new application
  • destroy - Permanently destroys an App
  • download - Download App
  • list - List applications
  • move - Move an App to another organization
  • resume - Resume an application
  • revert - Revert an App to previous version
  • sourcelist - List an App's Source List
  • suspend - Suspend an application
  • switch - Sets Current App

Options#

-h, --help help for apps

Global Options#

-t, --access-token string Nife API Access Token
-j, --json json output

nifectl apps create#

Create and register a new application with the Nife platform.

About#

The APPS CREATE command will both register a new application with the Nife platform and create the nife.toml file which controls how the application will be deployed. This is typically the first command you'll run when starting a new project on Nife.

The command will:

  1. Register your application name in the Nife platform
  2. Generate a default nife.toml configuration file
  3. Associate the app with your current organization
  4. Prepare the app for deployment

Usage#

nifectl apps create [APPNAME] [flags]

Options#

-h, --help help for create

Global Options#

-t, --access-token string nife API Access Token
-j, --json json output

Examples#

# Create a new app with a specific name
nifectl apps create my-awesome-app
# Create an app in interactive mode (prompts for details)
nifectl apps create
# Create with JSON output for scripting
nifectl apps create my-app --json

Common Use Cases#

  • Starting a new project: Create an app before your first deployment
  • Multiple environments: Create separate apps for dev, staging, and production
  • Microservices: Create individual apps for each service in your architecture

nifectl apps list#

View all applications registered across your organizations.

About#

The APPS LIST command will show the applications currently registered and available to this user. The list will include applications from all the organizations the user is a member of. Each application will be shown with its name, owner, and when it was last deployed.

This command is useful for:

  • Getting an overview of all your applications
  • Checking which organization owns which app
  • Verifying deployment dates
  • Finding app names for other commands

Usage#

nifectl apps list [flags]

Options#

-h, --help help for list

Global Options#

-t, --access-token string nife API Access Token
-j, --json json output

Examples#

# List all your apps
nifectl apps list
# List apps with JSON output for parsing
nifectl apps list --json
# Filter output using standard tools
nifectl apps list | grep "production"

nifectl apps destroy#

Permanently remove an application from the Nife platform.

About#

The APPS DESTROY command will permanently remove an application from the Nife platform. This action is irreversible and will:

  • Delete the application registration
  • Remove all deployment history
  • Clean up associated resources
  • Free up the application name for reuse

⚠️ WARNING: This action cannot be undone. Make sure you have backups of any important data before destroying an app.

Usage#

nifectl apps destroy [APPNAME] [flags]

Options#

-h, --help help for destroy
-y, --yes Accept all confirmations

Global Options#

-t, --access-token string Nife API Access Token
-j, --json json output

Examples#

# Destroy an app (will prompt for confirmation)
nifectl apps destroy my-old-app
# Destroy without confirmation prompt
nifectl apps destroy my-old-app --yes
# Destroy with JSON output
nifectl apps destroy my-old-app --yes --json

Safety Measures#

  1. Confirmation Prompt: Unless -y flag is used, you'll be asked to confirm
  2. Name Verification: You must specify the exact app name
  3. Access Control: Only organization admins can destroy apps

nifectl apps download#

Download application configuration and files.

About#

The APPS DOWNLOAD command retrieves application configuration files and settings from the Nife platform. This is useful for:

  • Backing up application configurations
  • Syncing settings across environments
  • Reviewing current application state
  • Restoring previous configurations

Usage#

nifectl apps download [APPNAME] [flags]

Options#

-h, --help help for download

Global Options#

-t, --access-token string Nife API Access Token
-j, --json json output

Examples#

# Download app configuration
nifectl apps download my-app
# Download with JSON format
nifectl apps download my-app --json

nifectl apps move#

Transfer an application to another organization.

About#

The APPS MOVE command will move an application to another organization that the current user belongs to. This is useful when:

  • Reorganizing project ownership
  • Transferring projects between teams
  • Consolidating applications under a single organization
  • Moving apps for billing purposes

Note: You must be a member of both the source and destination organizations.

Usage#

nifectl apps move [APPNAME] [flags]

Options#

-h, --help help for move
--org string The organization to move the app to
-y, --yes Accept all confirmations

Global Options#

-t, --access-token string Nife API Access Token
-j, --json json output

Examples#

# Move app to another organization (interactive)
nifectl apps move my-app
# Move to a specific organization
nifectl apps move my-app --org target-org
# Move without confirmation
nifectl apps move my-app --org target-org --yes

nifectl apps resume#

Restart a suspended application.

About#

The APPS RESUME command will restart a previously suspended application. The application will resume with its original region pool and a minimum count of one, meaning there will be one running instance once restarted.

When an app is resumed:

  • It starts with min count of 1 instance
  • Uses the original region configuration
  • Restores previous environment variables
  • Reconnects to configured services

Use the scale command to adjust the number of running instances after resuming.

Usage#

nifectl apps resume [APPNAME] [flags]

Options#

-a, --app string App name to operate on
-c, --config string Path to an app config file or directory containing one (default "./nife.toml")
-h, --help help for resume

Global Options#

-t, --access-token string Nife API Access Token
-j, --json json output

Examples#

# Resume a suspended app
nifectl apps resume my-app
# Resume using config file
nifectl apps resume --config ./nife.toml
# Resume with specific app flag
nifectl apps resume --app my-app

Resume Process#

  1. Validation: Checks if app is suspended
  2. Resource Allocation: Assigns compute resources
  3. Instance Start: Launches one instance
  4. Health Check: Verifies app is responding
  5. Active State: App is now running and accepting traffic

nifectl apps suspend#

Temporarily stop an application.

About#

The APPS SUSPEND command will temporarily stop an application from running. This is useful when you want to:

  • Reduce costs during idle periods
  • Perform maintenance on connected services
  • Temporarily disable an application without deleting it
  • Conserve resources during development

The app can be resumed later with nifectl apps resume.

Usage#

nifectl apps suspend [APPNAME] [flags]

Options#

-h, --help help for suspend

Global Options#

-t, --access-token string Nife API Access Token
-j, --json json output

Examples#

# Suspend an app
nifectl apps suspend my-app
# Suspend with JSON output
nifectl apps suspend my-app --json

nifectl apps revert#

Roll back an application to a previous version.

About#

The APPS REVERT command allows you to roll back an application to a previous version. This is crucial when:

  • A new deployment introduces bugs
  • Performance degrades after an update
  • You need to quickly restore working functionality
  • Testing a rollback strategy

The command accesses your deployment history and restores a specified previous state.

Usage#

nifectl apps revert [APPNAME] [flags]

Options#

-h, --help help for revert

Global Options#

-t, --access-token string Nife API Access Token
-j, --json json output

Examples#

# Revert to previous version (interactive)
nifectl apps revert my-app
# View deployment history first
nifectl history my-app
# Then revert to specific version
nifectl apps revert my-app --version v42

nifectl apps switch#

Set the current active application context.

About#

The APPS SWITCH command sets the current application context for subsequent commands. This is useful when working with multiple applications, allowing you to:

  • Avoid repeatedly specifying app names
  • Streamline workflow when focusing on one app
  • Reduce command-line typing
  • Prevent errors from specifying wrong app names

Usage#

nifectl apps switch [APPNAME] [flags]

Options#

-h, --help help for switch

Global Options#

-t, --access-token string Nife API Access Token
-j, --json json output

Examples#

# Switch to an app
nifectl apps switch my-app
# Now subsequent commands use this app by default
nifectl logs
nifectl metrics
nifectl status
# Switch to another app
nifectl apps switch my-other-app

nifectl apps sourcelist#

Display the source code list for an application.

About#

The APPS SOURCELIST command lists an application's source code history and references. This helps you:

  • Track deployment sources
  • Verify which code version is deployed
  • Audit deployment history
  • Debug deployment issues

Usage#

nifectl apps sourcelist [APPNAME] [flags]

Options#

-h, --help help for sourcelist

Global Options#

-t, --access-token string Nife API Access Token
-j, --json json output

Examples#

# View source list
nifectl apps sourcelist my-app
# View with JSON output for parsing
nifectl apps sourcelist my-app --json

Application Lifecycle#

  1. Create: nifectl apps create app-name
  2. Deploy: nifectl deploy
  3. Monitor: nifectl status, nifectl logs
  4. Scale: Adjust resources as needed
  5. Update: Deploy new versions
  6. Suspend: Temporarily stop if needed
  7. Resume: Restart when required
  8. Destroy: Remove when no longer needed

Troubleshooting Common Issues#

App Creation Fails#

Problem: "App name already exists"

  • Solution: Choose a different name or check if you have permission to access the existing app

Problem: "Invalid app name"

  • Solution: Use only lowercase letters, numbers, and hyphens

App Won't Resume#

Problem: "Insufficient resources"

  • Solution: Check org quota and upgrade if needed

Problem: "Configuration error"

  • Solution: Validate nife.toml file with nifectl config validate

Move Command Fails#

Problem: "Permission denied"

  • Solution: Ensure you're a member of both source and destination orgs

Problem: "Org limit reached"

  • Solution: Contact support to increase organization app limit

Revert Issues#

Problem: "Version not found"

  • Solution: Check deployment history with nifectl history

Problem: "Revert validation failed"

  • Solution: Ensure the target version is compatible with current platform