Ashtanga Yoga is described by Devi (the mother) to Himalaya in Devi Bhagavatam, Seventh Book, Chapter XXXV in details.
योगं वद महेशानि सांगं संवित्प्रदायकम् ।
कृतेन येन योग्योऽहं भवेयं तत्त्वदर्शने ॥ 1 ॥
Himalaya said: "O Maheswari Now tell me the Yoga with all its Angas (limbs) giving the knowledge of the Supreme Consciousness so that, I may realise my Self, when I practise according to those instructions.”
न योगो नभस: पृछे न भूमी न रसातले ।
ऐक्यं जीवात्मनोराहुर्योगं योगविशारदा: ।।2।।
तत्प्रत्यूहा: षडाख्याता योगविध्न करानघ ।
कामक्रोधौ लोभमोहौ मदमात्सर्यसंज्ञकौ ॥ 3 ।।
Sri Devi said: "The Yoga does not exist in the Heavens; nor does it exist on earth or in the nether regions (Patala). Those who are skilled in the Yogas say that the realisation of the identtily between the Jivatma and the Paramatma is 'Yoga.
योगागैरेव भित्त्वा तान्योगिनो योगमाप्नुयु ।
यमं नियममासनप्राणायामौ ततः परम् ।। 4 ।।
प्रत्याहारं धारणाख्यं ध्यानं साध समाधिना ।
अष्टांगान्याहुरेतानि योगिनां योगसाधने ॥ 5 ॥
अहिंसा सत्यमस्तेयं ब्रह्मचर्यं दयाऽऽर्जवम् ।
क्षमा धृतिर्मिताहार: शौचं चेति यमा दश । 6 ॥
तपः संन्तोष आस्तिक्यं दानं देवस्य पूजनम् ।
सिद्धांत श्रवणं चैव ह्रीर्मतिश्च जपो हुतम् ॥ 7 ॥
O Sinless One. The enemies to this Yoga are six; and they are lust, anger, greed ignorance, Vanity and jealousy. The Yogis attain the Yoga when they become able to destroy these six enemies by practising the accompaniments to Yoga. Yama, Niyama, Asana, Prāņāyāma, Pratyāhāra, Dhāraņā, Dhyana, and Samadhi, these are the eight limbs of Yoga. Yama includes Ahirinsa (non-injuring; nonkilling); truthfulness; Asteyam (non-stealing by
mind or deed); Brahmacarya (continence); Daya (mercy to all beings); Uprightness; forgiveness, steadiness; eating frugally, restrictedly and cleanliness (external and internal).
दशैते नियमाः प्रोक्तकां मया पर्वतनायक ।
पदासन स्वस्तिक च भद्र वज्रासन तथा । 8 ।
वीरासनमिति प्रोक्तं क्रमादासनपञ्चकम् ।
ऊर्वोरुपरि विन्यस्य सम्यक्पादतले शुभे । 9 ॥
अंगुष्ठैौ च निबध्नीयाद्धस्ताभ्यां व्युत्क्रमात्ततः ।
पद्मासनमिति प्रोक्तं योगिनां हृदयङ्गमम् ॥ 10 ॥
These are ten in number. Niyama includes also ten qualities: (1) Tapasya (austerities and penances); (2) Contentment; (3) Āstikya (faith in the God and the Vedas, Devas, Dharma and Adharma); (4) Charity (in good causes); Worship of God; hearing the Siddhantas (established saying) of the Vedas; Hri or modesty (not to do any irreligious or blameable acts); Sraddha (faith to go do good works that are sanctioned); (9) Japam (uttering silently the mantrams, Gayatris or saying of Puranas) and (10) Homam (offering oblations daily to the Sacred Fire. There are five kinds of Asanas (Postures) that are commendable: Padmasana, Svastikāsana, Bhadrāsana. Vajrāsana and Vīrāsana. Padmāsana consists in crossing the legs and placing the feet on the opposite thighs (the right foot on the left thigh and the left foot on the right thigh) and catching by the right hand brought round the back, the toes of the right foot and catching by the left hand brought round the back the toes of the left foot; sitting then straight and with ease. This is recommended by the Yogis (and by this one can raise oneself in the air).
जानूर्वोरन्तरे सम्यक्कृत्वा पादतले शुभे ।
ऋतुकायो विशेद्योगी स्वस्तिकं तत्प्रचक्षते। 11 ।
सीवन्याः पार्श्वयोन्यस्य गुल्फयुग्मं सुनिश्चितम् ।
वृषणाधः पादपाष्णीं पार्षिणभ्यां परिबन्धयेत् ॥ 12 ॥
भद्रासनमिति प्रोक्तं योगिभिः परिपूजितम् ।
ऊर्वोः पादौ क्रमान्यस्य जान्वोः प्रत्यङ्मुखांगुली ॥ 13 ।।
Place the soles of the feet completely under the thighs, keep the body straight, and sit at ease. This is called the Svastikasana. Bhadrasana consists in placing well the two heels on the two sides of the two nerves of the testicles near the anus an catching by the two hands the two heels at her lower part of the testicles then sitting at ease. This is very much liked by the Yogis.
करौ विदध्यादाख्यातं वज्रासनमनुत्तमम् ।
एक पादमधः कृत्वा विन्यस्योरु तथोत्तरे। 14 ।
ऋजुकायो विशेद्योगी वीरासनमितीरितम् ।
Vajrasana (diamond seat) consists in placing the feet on the two thighs respectively and placing the fingers below the thighs with the hands also there, and then sitting at ease. Virasana consists in Sitting cross on the hams in placing the right foot under the right thigh and the left foot under the left thigh and sitting at ease with body Straight.
इडयाऽऽकर्षयेद्वायुं ब्राह्यं षोडशमात्रया ।। 1 5 ॥
धारयेत्पूरितं योगी चतु:षष्ठया तु मात्रया ।
सुषुम्नामध्यगं सम्यग्द्वात्रिंशन्मात्रया शनैः ॥ 16 ॥
नाङया पिङ्गलया चैव रेचयेद्योगवित्तमः ।
Taking in the breath by the Ida (the left nostril) so long as we count Om' sixteen, retaining it in the Suşumnā so long as we count “Om” sixty-four times and then exhaling it slowly by the Pinglala nādī (the right nostril) as long as we count “Om” thirty-two times. (The first process is called Piiraka, the second is called Kumbhaka, and the third is called Reacaka).
प्राणायाममिमं प्राहुर्योगशास्त्रविशारदाः । 17 ।
भूयो भूयः क्रमात्तस्य ब्राह्यमेवं समाचरेत् ।
मात्रावृद्धिक्रमेणौव सम्यग्द्वादश षोडश । 18 ।
This is called one Pranayama by those versed
in the Yogas. Thus one should go on again with his Pranayama. At the very beginning, try with the number twelve, i.e., as we count “Om’ twelve times and then increase the number gradually, to sixteen and so on.
जपध्यानादिभिः सार्धं सगर्भं तं विदुर्बुधाः।
तदपेतं विगर्भ च प्राणायामं परे विदुः । 19 ॥
Pranayama is of two kinds: Sagarbha and Vigarbha. It is called Sagarbha when Pranayama is performed with repeating the Ista Mantra and Japam and meditation. It is called Vigarbha Pranayama when 'Om is simply counted and no other Mantram.
क्रमादभ्यस्यतः पुंसो देहे स्वेदोद्भमोऽधमः ।
मध्यमः कंपसंयुक्तो भूमित्यागः परो मतः ॥ 20 ॥
उत्तमस्य गुणावाप्तिर्यावच्छीलनमिष्यते ।
When this Pranayama is practised repeatedly, perspiration comes first when it is called of the lowest order, when the body begins to tremble, it is called middling, and when one rises up in the air, leaving the ground, it is called the best Pranayama. (Therefore one who practises Pranayama Ought to continue it till he becomes able to rise in the air).
इन्द्रियाणां विचरतां विषयेषु निरर्गलम् ॥ 21 ॥
बलादाहरणां तेभ्यः प्रत्याहारोऽभिधीयते ।
Now comes Pratyahara. The senses travel Spontaneously towards their objects, as if they are Without anyone tos check. To curb them perforce and to make them turn backwards from those objects is called Pratyahara.
अङ्गुष्ठगुल्फजानूरुमूलाधारलिंगनाभिषु ॥ 22 ॥
हृद्ग्रीवाकण्ठदेशेषु लम्बिकायां ततो नसि ।
भूमध्ये मस्तके मूर्टिन द्वादशान्ते यथाविधि। 23 ।
धारणां प्राणामरुतो धारणेति निद्यते ।
To hold the Prana Vayu on toes, heels, knees, thighs, Secrum, genital organs, navel, heart, neck, throat, the Soft palate, nose, between the eyebrows, and on the top of the head, at these twelve places respectively is called the Dharana.
समाहितेन मनसा चैतन्यांतरवर्तिना । 24 ।
आत्मन्यभीष्टदेवानां ध्यानं ध्यानमिहोच्यते ।
समत्वभावना नित्यं जीवात्मपरमात्मनोः ॥ 25 ॥
समाधिमाहुर्मुनयः प्रोक्तमष्टागलक्षणम् ।
इदानीं कथये तेऽहं मन्त्रयोगमनुत्तमम् । 26 ॥
विश्वं शरीरमित्युक्तं पञ्चभूतात्मकं नग ।
चन्द्रसूर्याग्नितेजोभिजवब्रहौक्यरूपकम् ॥ 27 ॥
Concentrate the mind on the consciousness inside and then meditate the Ista Devata Within the Jĩvãtmã. This is the Dhyãna. Samãdhi is identifying always the Jīvātmā and Paramātmā. Thus the Sages say. (Samadhi is of two kinds (I) Samprajnata, or Savikalpak and (2) Nirvikalpak. When the ideas the Knower, Knowledge and the Thing Known, remain separate in the consciousness and yet the mind feels the one Akhanda Saccidananda Brahma and his heart remains, there, that is called Samprajnata Samadhi; and when those three vanish away and the one Brahma remains, it is called Asamprajñata Samadhi). Thus I have described to you the Yoga with its eight limbs. O, Mountain. This body composed of the five elements, and with Jiva endowed with the essence of the Sun the Moon, and the Fire and Brahmain it as one and the same, is denominated by the term “Višva.”
ŚĀṆDILYA-UPANISHAḌ OF AṬHARVAṆAVEḌA, Chapter I also deals with Ashtanga Yoga.