summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-09-13 00:28:19 -0700
committerNate Sesti <sestinj@gmail.com>2023-09-13 00:28:19 -0700
commit8cce7eb46b325b7d44a6ed66ce77c860142fa97d (patch)
treea8e5dff11b72172e08e33e8d077f9950ee5e1e34 /docs
parentf499a2f4a285e57fb8267057a6c6aa77d0a7be0b (diff)
downloadsncontinue-8cce7eb46b325b7d44a6ed66ce77c860142fa97d.tar.gz
sncontinue-8cce7eb46b325b7d44a6ed66ce77c860142fa97d.tar.bz2
sncontinue-8cce7eb46b325b7d44a6ed66ce77c860142fa97d.zip
docs: :memo: headless mode docs (start)
Diffstat (limited to 'docs')
-rw-r--r--docs/docs/walkthroughs/headless-mode.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/docs/walkthroughs/headless-mode.md b/docs/docs/walkthroughs/headless-mode.md
new file mode 100644
index 00000000..92382d77
--- /dev/null
+++ b/docs/docs/walkthroughs/headless-mode.md
@@ -0,0 +1,27 @@
+# Completing Tasks Asynchronously with Headless Mode
+
+"Headless mode" allows Continue to run in the background, without needing to be connected to the IDE or GUI. This is useful for performing refactors or other tasks that might take time to complete. Headless mode can also be run in CI/CD for example to perform a thorough review for errors.
+
+To use headless mode:
+
+1. `pip install continuedev` (using a virtual environment is recommended)
+2. Create a config file (see the [`ContinueConfig` Reference](../reference/config.md) for all options) that includes the [Policy](../customization/other-configuration.md#custom-policies) you want to run
+3. Import `continuedev` and call `start_headless_session` with either the path to your config file, or an instance of `ContinueConfig`
+
+Example:
+
+```python
+from continuedev.headless import start_headless_session
+from continuedev.core.config import ContinueConfig
+from continuedev.core.models import Models
+import asyncio
+
+config = ContinueConfig(
+ models=Models(...),
+ override_policy=MyPolicy()
+)
+asyncio.run(start_headless_session(config))
+
+# Alternatively, pass the path to a config file
+asyncio.run(start_headless_session("/path/to/config.py"))
+```