--- title: "Getting started with LumiCode" slug: "getting-started-with-lumicode" tags: ["LumiCode", "Getting started"] updated: 2026-10-23T12:22:01Z published: 2026-10-23T12:22:01Z canonical: "support.lusid.com/getting-started-with-lumicode" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.lusid.com/llms.txt > Use this file to discover all available pages before exploring further. # Getting started with LumiCode In about fifteen minutes, you'll find a provider, write and run a query, explore and chart the results, and save them, all without leaving the keyboard. Along the way you'll pick up the handful of keys that make LumiCode quick to use every day. The examples query Luminesce's own catalog, so they work in any LUSID domain. ## Prerequisites - LumiCode installed, and signed in to your LUSID domain. See [How do I install LumiCode?](/v1/docs/how-do-i-install-lumicode) - Permission to query the `Sys.Field` provider, which lists the fields of every provider in your catalog. ## A few terminal basics LumiCode runs in a terminal, the text window your computer uses for typing commands. If you already use one every day, skip ahead to Step 1. - **Opening a terminal.** On macOS, open iTerm2, or Terminal from **Applications > Utilities**. On Windows, open Windows Terminal from the Start menu. - **Key names.** This article names keys as you press them: Enter, Tab, Esc, Shift, Ctrl. LumiCode's own help uses the symbols you see on Mac keyboards: ⏎ Enter, ⇥ Tab, ⇧ Shift, ^ Ctrl, ⌥ Option (Alt on Windows). So `^J` means Ctrl+J. - **Getting back out.** Esc steps back or closes whatever is open. `/help` lists every command at any time. ## Step 1: Start LumiCode In your terminal, type `lumi` and press Enter. LumiCode opens with a welcome screen and a prompt, `❯`, where you type both SQL and LumiCode's own commands. Every command starts with `/`. ![LumiCode's welcome screen and the ❯ prompt](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-98KRDK4J.png?sv=2026-02-06&spr=https&st=2026-11-18T19%3A26%3A43Z&se=2026-11-18T20%3A26%3A43Z&sr=b&sp=r&sig=OrBpjjWqh96YuGO8mHu%2BKPsczPEqU%2BNLLR%2Booe44R68%3D) Type `/` and press Tab. LumiCode lists every command, with the help for the highlighted one beside the list. Use the arrow keys to look through them, then press Esc to close the list. ## Step 2: Look up a provider Before you write a query, it helps to know what you can query. Type the following and press Enter: ```plaintext /catalog Sys.Field ``` LumiCode lists the providers that match. Select `Sys.Field` and press Enter to see its fields. `TableName` is the name of a provider, and `FieldType` says whether a field is a column or a parameter. ![The fields of Sys.Field in /catalog](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-H31V901H.png?sv=2026-02-06&spr=https&st=2026-11-18T19%3A26%3A43Z&se=2026-11-18T20%3A26%3A43Z&sr=b&sp=r&sig=eVheXerH%2FRq5ZIIay7VhZo2olgxX6IZOhTg7jDTgLLM%3D) Press Esc to go back one screen. You can see “breadcrumbs” in the banner at the top. In this case pressing Esc twice will get you to the prompt. ## Step 3: Write and run a query This query counts the columns of each `Lusid.Instrument` provider in your catalog: ```sql select TableName, count(*) as Columns from Sys.Field where TableName like 'Lusid.Instrument%' and FieldType = 'Column' group by TableName order by Columns desc ``` Type it at the prompt. As you type: - **Enter runs the query**, so it can't start a new line. To start a new line, press Shift+Enter. On macOS, most terminals send Shift+Enter as Enter, so press Ctrl+J instead, or run `/set enter newline` to swap Enter and Ctrl+J over. You can also type the whole query on one line. - **Tab completes what you are typing.** Try typing `from Sys.F` and pressing Tab: LumiCode offers the matching providers, with each one's documentation beside the list. It does the same for fields, functions and keywords. ![Code completion while writing the query (1 of 2)](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-YEERVRTS.png?sv=2026-02-06&spr=https&st=2026-11-18T19%3A26%3A43Z&se=2026-11-18T20%3A26%3A43Z&sr=b&sp=r&sig=qrAd8zm3eg0U12c1eAKyG6CDRLFPB1TPVnTLtcnHQWQ%3D) ![Code completion while writing the query (2 of 2)](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-MZD4SMM8.png?sv=2026-02-06&spr=https&st=2026-11-18T19%3A26%3A43Z&se=2026-11-18T20%3A26%3A43Z&sr=b&sp=r&sig=ZDeVHPYrAMzdfJbGbI2NYznhY4lVf%2FU%2FSFbkqhXwTzo%3D) When the query is complete, press Enter. LumiCode shows the query's progress while it runs, then writes a summary of the results into the transcript, the record of your session that scrolls above the prompt. ![Summary of the query's results in the transcript](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-JYKF1QFE.png?sv=2026-02-06&spr=https&st=2026-11-18T19%3A26%3A43Z&se=2026-11-18T20%3A26%3A43Z&sr=b&sp=r&sig=l9I5%2FAYVvf2tkYt0bC%2BpQEslgUtOAPHNL4j9nusb74E%3D) While a query runs Press Esc to stop waiting. The query carries on, and `/history` finds its results when it finishes. Press Ctrl+C to cancel it instead. ## Step 4: Explore the results The transcript shows a summary. To see every row, type `/rows` and press Enter. - Use the arrow keys to move between rows and columns. - Press Enter to open a row in full, and Esc to close it. - Press `s` to sort by the column under the cursor. - Press `/` to filter with SQL. For example, type `Columns > 20` to keep only the larger providers. Press Esc to leave `/rows`. For a quick summary of every numeric column, type `/stats`. It shows the minimum, median, maximum and average, with a sparkline for each. ![Exploring the results with /rows and /stats](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-ZHJK3QO6.png?sv=2026-02-06&spr=https&st=2026-11-18T19%3A26%3A43Z&se=2026-11-18T20%3A26%3A43Z&sr=b&sp=r&sig=cXw6XBMxKPuSewO0PcxiM%2BADL5yiyenjfLON47%2B%2FQeU%3D) ## Step 5: Chart the results Type the following and press Enter: ```plaintext /chart bar TableName Columns ``` LumiCode draws a bar chart into the transcript, beside the query: one bar per provider, sized by its number of columns. ![Bar chart of the number of columns per provider](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-9KTWO4D1.png?sv=2026-02-06&spr=https&st=2026-11-18T19%3A26%3A43Z&se=2026-11-18T20%3A26%3A43Z&sr=b&sp=r&sig=5vVPRAiPCeSIEzUQGwrL87kuAzogJ%2FVwhYi%2BcV8NhlY%3D) If you type `/chart` on its own, LumiCode asks for the kind of chart and the columns to use. It offers the likeliest answer first, so you can press Enter to accept each one. To see an example of every kind of chart, type `/chart gallery`. ## Step 6: Change the query and run it again Press the Up arrow at an empty prompt. LumiCode puts your last query back in the editor. Change `'Lusid.Instrument%'` to `'Lusid.Portfolio%'` and press Enter to run it again. Press Ctrl+P at any time to lay out the query neatly. The Up arrow goes further back each time you press it. To browse, rerun or save any recent query, type `/recent`. ## Step 7: Save the results Type `/save` and press Enter. Choose whether to save the results to a file on your computer or to Drive, then browse to the folder you want. `/save` can also store the query itself as a Saved Query in LUSID Workspaces, so that you or your colleagues can run it again later with `/run`. ## Step 8: Ask Candela about the query Candela is FINBOURNE's AI agent. Type the following and press Enter: ```plaintext /ai last What does this query tell me? ``` Candela explains the query you just ran, and if it had failed, why. You can carry on the conversation at the prompt. When Candela suggests a query, you can run it or edit it straight away. ![Candela explaining the last query](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-JFO67D7W.png?sv=2026-02-06&spr=https&st=2026-11-18T19%3A26%3A43Z&se=2026-11-18T20%3A26%3A43Z&sr=b&sp=r&sig=5nxOX1LA%2FbG2p0aZWAm6E9gGeyC4OGTpEraHTGf%2BS8U%3D) To go back to running SQL, type `/sql`, or press Esc at an empty prompt. `/ai resume` reopens the conversation later. Candela availability Candela is currently available to some customers only. If it isn't available in your domain, LumiCode tells you when you use `/ai`, and everything else in LumiCode works as usual. ## Step 9: Keep a record and leave Type `/transcript html` and press Enter. LumiCode writes everything you did in this session, including the chart, to a web page, and tells you where it saved it. Use `/transcript` on its own for a Markdown file instead. To leave LumiCode, type `/exit`, or press Ctrl+C twice at an empty prompt. ## What's next - [A tour of LumiCode](/v1/docs/a-tour-of-lumicode) shows what else LumiCode can do, from grouping results to diagnosing failed queries. - [LumiCode Commands](/v1/docs/lumicode-commands) describes every command in full. - In LumiCode, `/help keys` lists every editing key, and `/help <command>` shows the help for any command. If something doesn't work as described, such as links not opening or Shift+Enter running the query, see the [Troubleshooting section of How do I install LumiCode?](/v1/docs/how-do-i-install-lumicode#troubleshooting)