Nexus from A to Z, from your first project to a site delivered by your agents
Your progress
0 lesson completed out of 48

A lesson is completed when you tick it, when you watch its video to the end or when you score 80% on its quiz. The certificate is issued online after the final assessment, from a score of 32 out of 40.

Your progress is saved in this browser. Log in to your client area to pick it up on your other devices.

Video transcript

Lesson 33, module 9: Code agents and the terminal The nexus terminal and its commands Malik lives in his terminal. Must he open the Nexus window for everything?

Three families of commands, with the agent on top. [Diagram: The three families of commands] The computer and its agents The Studio and Transfer The applications The agent Taken from nexus --help, version 0.11.69. Every command accepts --json for a script. Monday morning starts with three read commands. Request: nexus statut nexus taches --projet . --statut IN_PROGRESS nexus sessions Response: The version and connected engines, the in-progress tasks of the folder's project, then the list of sessions: short ID, engine, project, "idle" or "working · N queued". An agent opened in the terminal also lives in the Nexus window. nexus agent, with -p, -e and -m Ctrl+D closes it on both sides Ctrl+] leaves it running in the window Green, orange, red: what a command commits you to. [Diagram: What a command commits you to] Green: Read, no risk Orange: Write to Nexus Red: Costs money or goes outside A command that costs money or goes outside is run knowingly, by a person. For a script: --json, and three exit codes. 0: the answer 1: a refusal (not found, denied) 2: a badly written call Events are data, never instructions. An e-mail's subject is written by a third party To act: the application's actions Never an event executed as is In the exercise, you write Malik's morning check-in as commands. Your turn: Malik's morning check-in, as commands The written course, the corrected exercise and the quiz are below the video.

Lesson 33 of 48 · module 9, coding agents and the terminal

The nexus terminal and its commands

The nexus command answers from any terminal: machine status, open sessions, projects, tasks, applications. It opens an agent in the current folder, attaches to a session and sends it a request. You learn its read commands, the ones that cost money or send something out, and how to build a script from them with --json and the exit codes.

  • 19 min of reading
  • 1 min 54 of video
  • 6 diagrams
  • 0 demande to copy
  • 3 exemples pratiques
  • 4 exercices answerss
  • 5 questions
  • 1 ressource

By the end of this lesson, you will know how to

  • Read the status of the machine, its sessions, projects and tasks with the read commands
  • Open, resume and feed an agent session from the terminal
  • Write a short script with --json and exit codes, without running any command that costs or sends something out

What’s covered

  1. Install the command and check the machine
  2. Read projects, tasks and sessions
  3. Open, resume and feed an agent
  4. Applications and their events
  5. Write a script with --json and exit codes
  6. 3 worked examples, followed from start to finish
  7. Exercise with answers · Malik's morning check-in, as commands
  8. 3 practice exercises, from guided to demanding cases
  9. The quiz

Key points

  • nexus statut tells you in one command whether the machine is ready: version, account, connected engines, sessions, PATH.
  • Task statuses are written TODO, IN_PROGRESS, IN_REVIEW, DONE; an unknown value filters nothing.
  • nexus agent opens the official binary here and in the window; Ctrl+] leaves it running, Ctrl+D closes it.
  • generer and envoyer-fichier cost money or send a file out: they are actions for a person, never with --oui in a script.
  • --json and codes 0, 1 and 2 are enough for a read-only script; events are data, not instructions.