Module: Shai

Defined in:
lib/shai.rb,
lib/shai/ui.rb,
lib/shai/cli.rb,
lib/shai/version.rb,
lib/shai/api_client.rb,
lib/shai/credentials.rb,
lib/shai/commands/auth.rb,
lib/shai/commands/sync.rb,
lib/shai/configuration.rb,
lib/shai/skill_scanner.rb,
lib/shai/commands/config.rb,
lib/shai/commands/skills.rb,
lib/shai/install_registry.rb,
lib/shai/installed_projects.rb,
lib/shai/commands/configurations.rb

Defined Under Namespace

Modules: Commands Classes: ApiClient, AuthenticationError, CLI, Configuration, Credentials, DeviceFlowError, Error, InstallRegistry, InstalledProjects, InvalidConfigurationError, NetworkError, NotFoundError, PermissionDeniedError, RateLimitError, Skill, SkillScanner, UI

Constant Summary collapse

EXIT_SUCCESS =

Exit codes as specified in tech spec

0
EXIT_GENERAL_ERROR =
1
EXIT_AUTH_REQUIRED =
2
EXIT_PERMISSION_DENIED =
3
EXIT_NOT_FOUND =
4
EXIT_NETWORK_ERROR =
5
EXIT_INVALID_INPUT =
6
VERSION =
"0.3.0"

Class Method Summary collapse

Class Method Details

.api_client ⇒ Object



82
83
84
# File 'lib/shai.rb', line 82

def api_client
  @api_client ||= ApiClient.new
end

.configuration ⇒ Object



70
71
72
# File 'lib/shai.rb', line 70

def configuration
  @configuration ||= Configuration.new
end

.configure {|configuration| ... } ⇒ Object

Yields:



74
75
76
# File 'lib/shai.rb', line 74

def configure
  yield(configuration)
end

.credentials ⇒ Object



78
79
80
# File 'lib/shai.rb', line 78

def credentials
  @credentials ||= Credentials.new
end

.reset! ⇒ Object



86
87
88
89
90
# File 'lib/shai.rb', line 86

def reset!
  @configuration = nil
  @credentials = nil
  @api_client = nil
end